<!DOCTYPE html>
<html>
<head>
    {include file='public/meta'/}
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/css/Statistics.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/member/css/member-info.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/css/setcardlist.css"/>


    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/bootstrap-table/bootstrap-table.css"/>
    <script src="__STATIC_URL__/static/bootstrap-table/bootstrap-table.js"></script>
    <script src="__STATIC_URL__/static/bootstrap-table/bootstrap-table-zh-CN.js"></script>

</head>
<body>
{include file='public/header'/}
<section id="content">
    <!------------------导航-------------------------->
    {include file='public/left'/}
    <!--------------------------主要内容区域------------------------------------->
    <div class="content" style="background:none;">
        <div class="page-heading mgl15 mgr15">
            <ol class="breadcrumb">
                <li>当前位置是&nbsp;:</li>
                <li><a href="{:url('cardus/carduslist')}">会员卡管理</a></li>
                <li>
                    <a href="javascript:history.back();">会员卡统计</a>
                </li>
                <li class="active" style="color: #02b87f;"> 退卡数据</li>
            </ol>
        </div>
        <div style="background:#fff;">
            <div class="row" style="    margin-bottom: 20px;">
                <div class="col-lg-12">
                    <ul class="nav nav-tabs tabs"  style="width: 100%;">
                        <li class="tab">
                            <a href="{:url('report/cardsurvey')}" >概览数据</a>
                        </li>
                        <li class="tab ">
                            <a href="{:url('report/reportcardmemberlist')}">消费数据</a>
                        </li>

                        <li class="tab ">
                            <a href="{:url('report/cardreglist')}">充值数据</a>
                        </li>
                        <li class="tab ">
                            <a href="{:url('report/cardbonuslist')}">积分数据</a>
                        </li>
                        <li class="tab active">
                            <a href="{:url('report/carddellist')}" class="active">退卡数据</a>
                        </li>
                        <li class="tab"></li>
                    </ul>
                </div>
            </div>
            <div class="panel panel-default panel-search mgl15 mgr15">
                <div class="panel-heading">
                    <h3 class="panel-title"><span class="glyphicon glyphicon-search pull-left" style="margin-right: 10px;"></span>筛选</h3>
                </div>
                <div class="panel-body">
                    <form action="" method="get" class="form-horizontal table-search form-search" role="form" id="machform">

                        <div class="col-sm-6 col-md-6 col-lg-4 ">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">卡号：</label>
                                <div class="col-sm-9">
                                    <input type="text" class="form-control"  placeholder="请输入卡号" value="" id="code">
                                </div>
                            </div>
                        </div>

                        <div class="col-sm-6 col-md-6 col-lg-4 ">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">时间：</label>
                                <div class="col-sm-9">
                                    <div class="">
                                        <input name="search_date" type="text" value=""  readonly="readonly" id="search_date" placeholder="请选择" class="form-control">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="panel-footer">
                    <a href="javascript:;" class="btn btn-primary" onclick="searchform()">查找</a>
                    <a href="javascript:;" class="btn btn-default" onclick="clearform()">清空</a>
                </div>
            </div>



            <div class="panel mgl15 mgr15">
                <div class="panel-heading addCharts" style="background:#ededed;">数据明细


                    <a href="javascript:;" onclick="load();" class="btn btn-info"
                       style="float: right;  margin-top: -7px;">点击下载</a>

                </div>
                <div class="panel-body">
                    <table class="table table-bordered table-striped" id="tablelist">

                    </table>
                </div>
            </div>

            {include file='public/footer'/}
        </div>
    </div>
</section>




</body>
<script src="__STATIC_URL__/static/laydate/laydate.js"></script>
<script src="/wntable.js?v=1"></script>
<script>
    laydate.render({
        elem: '#search_date',
        type: 'datetime',
        range: true,
        change: function(value, date,endDate){ //监听日期被切换

        },
        ready: function(date){
            $(".layui-laydate-footer [lay-type='datetime'].laydate-btns-time").click();
            $(".laydate-main-list-1 .layui-laydate-content li ol li:last-child").click();
            $(".layui-laydate-footer [lay-type='date'].laydate-btns-time").click();

        },
    });
</script>
<script type="text/javascript">
    function searchform() {
        $("#tablelist" ).bootstrapTable('refresh');
    }
    $(function () {
        var type = "carddellist";
        var url = "{:url()}";
        getcolumn(type, url, "tablelist")
    });
    function load() {
        $.ajax({
            url: "{:url()}",
            data: {
                type:"out_excel",
                mchid: $("#mach").val(),//后台请求传的查询参数
                search_date:$("#search_date").val(),
                action_user:$("#action_user").val(),
                code:$("#code").val(),
            },
            dataType: "json",
            async: false,
            type: "post",
            success: function (res) {
                console.log(res);
                window.location.href = res;
            }
        })


    }
    $(function () {

        $(".checkAll").click(function(){
            if(this.checked){
                $(".checkSingel").prop("checked",true);
            }else{
                $(".checkSingel").prop("checked",false);
            }

        });
    });
    //筛选条件
    function filtertj() {
        $("#payform").submit();
    };
    //筛选条件
    function cleartj() {
        $(".form-virtical input").val("");
        $("select").val("");
    };
</script>
<script>

</script>
</html>
